Skip to content

fix: resolve 5 critical package vulnerabilities (form-data, cipher-base, sha.js, pbkdf2, tar) - #108

Merged
manufacturist merged 2 commits into
masterfrom
fix/vanta-critical-deps
Aug 20, 2026
Merged

fix: resolve 5 critical package vulnerabilities (form-data, cipher-base, sha.js, pbkdf2, tar)#108
manufacturist merged 2 commits into
masterfrom
fix/vanta-critical-deps

Conversation

@manufacturist

Copy link
Copy Markdown

Resolves 5 critical dependency advisories flagged by our dependency scanner.

Four in-range updates (lockfile only)

All four are dev-only transitive dependencies whose fixed versions already satisfy their parents' semver ranges, so no package.json change was needed:

package change advisory reached via
form-data 3.0.0 → 3.0.5 CVE-2025-7783 gitlab (^3.0.0)
cipher-base 1.0.4 → 1.0.7 CVE-2025-9287 browserify-aes/-des, create-hash/-hmac
sha.js 2.4.11 → 2.4.12 CVE-2025-9288 create-hash/-hmac, pbkdf2
pbkdf2 3.1.2 → 3.1.6 CVE-2025-6547 crypto-browserify, parse-asn1

tar is removed, not bumped (CVE-2026-59873)

tar was never used by this project — no source file imports it, and nothing in the dependency tree requires it.

It was introduced as a bare root pin (tar: ">=4.4.18", later >=6.2.1) in TCE-797 (#93) to force an upgrade of the tar that fsevents@1.x bundles for node-pre-gyp. A root-level dependency cannot override a nested bundled one, so the pin never fixed the vulnerable copy — it just added a second, independent tar to the tree. That second copy is what has now been flagged twice (it was already bumped once in #95).

Since nothing else requires it, deleting the pin removes tar and its six exclusive deps (fs-minipass, minipass, minizlib, chownr, mkdirp, yallist) from the lockfile entirely.

Notes for review

  • Advisory ranges from npm are wider than the scanner's for two of these (tar <=7.5.20 vs <=7.5.18; form-data 3.0.0-3.0.4 vs <3.0.4). The higher fixed versions were used, otherwise npm audit would still report them.
  • lockfileVersion is deliberately kept at 2. CI runs Node 10 (npm 6), which cannot read lockfileVersion 3.
  • The full lockfile diff is 47 entry changes: the 4 targets, 10 collateral patch bumps within existing ranges, 21 new transitive deps of the updated crypto shims, and 13 removals (tar + its deps, plus has-proto which the newer get-intrinsic no longer needs).

Verification

  • npm ci → exit 0, 990 packages
  • all five packages report clear in npm audit
  • npm run build produces a byte-identical bundle — hash 61cff45dbf8e65fc, matching a pre-change baseline build. No build output is included in this PR.

Pre-existing issues, not addressed here

  • The build fails on modern Node. Webpack 4 hits error:0308010C:digital envelope routines::unsupported under OpenSSL 3; this reproduces on master. Building today requires NODE_OPTIONS=--openssl-legacy-provider (or Node <= 16), which is how the baseline above was produced.
  • The committed material/ assets no longer match what the toolchain produces — rebuilding yields different content hashes than the checked-in files. Unchanged by this PR, but worth noting since the build workflow's last step is a git diff drift check.

🤖 Generated with Claude Code

Four are dev-only transitive deps, updated within their existing parent
semver ranges (lockfile-only, no package.json change):

- form-data   3.0.0  -> 3.0.5   CVE-2025-7783  (via gitlab, ^3.0.0)
- cipher-base 1.0.4  -> 1.0.7   CVE-2025-9287  (via browserify-aes/des, create-hash/hmac)
- sha.js      2.4.11 -> 2.4.12  CVE-2025-9288  (via create-hash/hmac, pbkdf2)
- pbkdf2      3.1.2  -> 3.1.6   CVE-2025-6547  (via crypto-browserify, parse-asn1)

tar (CVE-2026-59873) is removed rather than bumped. It was never used by
this project - no source file imports it. It was added as a bare root pin
in TCE-797 to force an upgrade of the tar that fsevents@1.x bundled for
node-pre-gyp, but a root-level dependency cannot override a nested bundled
one, so the pin fixed nothing and simply added a second copy of tar to the
tree. That copy is what Vanta has now flagged twice (also bumped in #95).
Nothing else in the tree requires tar, so removing the pin drops it
entirely.

Note the advisory ranges npm reports are wider than Vanta's for two of
these (tar <=7.5.20 vs <=7.5.18, form-data 3.0.0-3.0.4 vs <3.0.4), so the
higher fixed versions were used.

lockfileVersion deliberately kept at 2: CI runs Node 10 (npm 6), which
cannot read lockfileVersion 3.
@manufacturist
manufacturist requested a review from a team as a code owner August 19, 2026 14:09
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses five critical vulnerabilities (form-data, cipher-base, sha.js, pbkdf2, and tar) and maintains lockfile compatibility for Node 10. While the updates are largely beneficial and Codacy results are up to standards, the removal of the 'tar' dependency requires careful verification. If 'tar' is used directly in the codebase or was previously pinned to mitigate transitive vulnerabilities (such as CVE-2023-46136), its removal may lead to runtime failures or security regressions. The provided test plan focuses on auditing the final dependency tree and verifying build integrity to ensure no regressions were introduced.

Test suggestions

  • Verify that npm audit reports no vulnerabilities for the targeted packages after the update.\n- [ ] Verify 'tar' and its exclusive transitive dependencies (fs-minipass, minipass, minizlib, chownr, mkdirp, yallist) are purged from the lockfile.\n- [ ] Run the build pipeline and compare the bundle hash to ensure no functional regressions occurred during dependency updates.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that npm audit reports no vulnerabilities for the targeted packages after the update.\n- [ ] Verify 'tar' and its exclusive transitive dependencies (fs-minipass, minipass, minizlib, chownr, mkdirp, yallist) are purged from the lockfile.\n- [ ] Run the build pipeline and compare the bundle hash to ensure no functional regressions occurred during dependency updates.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread package.json
"ramda": "^0.27.0",
"rxjs": "^7.0.0-beta.0",
"tar": ">=6.2.1"
"rxjs": "^7.0.0-beta.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 HIGH RISK

The PR title mentions resolving a vulnerability in 'tar', but the package was removed from 'package.json'. If this entry was used to override a transitive vulnerability (e.g., for node-gyp), removing it may re-introduce the risk. Additionally, if 'tar' is used directly in the code, this change will cause a runtime error. \n\nCheck if 'tar' is used directly or as a version override; if it is still required by the dependency tree, ensure it is updated to a secure version rather than being removed.

zhamborova
zhamborova previously approved these changes Aug 19, 2026
The build job has been failing at 'Set up job' for every non-master branch
since GitHub closed down actions/cache v1:

  This request has been automatically failed because it uses a deprecated
  version of actions/cache: v1

Nothing in the job ever ran, so every PR has been red for months. It went
unnoticed because the job is skipped on master (if: github.ref != master),
and a skipped job reports success.

  actions/checkout   v2 -> v4
  actions/setup-node v1 -> v4
  actions/cache      v1 -> v4

NODE_VERSION is left at 10.x deliberately: the committed material/ assets
were built with it, and Node 10 (OpenSSL 1.1) still provides the md4 hash
webpack 4 needs. Every dependency changed in this PR is Node 10 compatible
(strictest engine is form-data >= 6).
@manufacturist
manufacturist merged commit f8d51a5 into master Aug 20, 2026
2 checks passed
@manufacturist
manufacturist deleted the fix/vanta-critical-deps branch August 20, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants